import Vue from 'vue'
import VueRouter from 'vue-router'
import Bar from "../views/Bar";
import Table from "../views/Table";
import Pie from "../views/Pie";
import Upd from "../views/Upd";
import Add from "../views/Add";

Vue.use(VueRouter)

const routes = [

  {
    path: '/table',
    name: 'Table',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/Table.vue')
  },
  {
    path: '/bar',
    component:Bar
  },
  {
    path: '/pie',
    component:Pie
  },
  {
    path: '/upd',
    component:Upd
  },
  {
    path: '/add',
    component:Add
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
